package week06.PersonCmp;

import java.util.Random;

public class TestPersonCmb {
  public static void main(String[] args) {
    Person[] people=new Person[10];
    Random  random=new Random();
    for (int i=0;i<10;i++){
      people[i]=new Person(random.nextInt(100)+100);
    }
    for (int i=0;i<people.length;i++){
      System.out.println(i+1+" "+people[i].getHeight());
    }
    AbstratPersonCmb personCmb=new PersonCmpByHeight();
    personCmb.sort(people);
    System.out.println("排序后");
    for (int i=0;i<people.length;i++){
      System.out.println(i+1+" "+people[i].getHeight());
    }
  }
}
